/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Jhon
 */
@Embeddable
public class BanktxPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idBankTx", nullable = false)
    private int idBankTx;
    @Basic(optional = false)
    @Column(name = "Account_User_idUser", nullable = false)
    private int accountUseridUser;
    @Basic(optional = false)
    @Column(name = "TxType_idTxType", nullable = false)
    private int txTypeidTxType;
    @Basic(optional = false)
    @Column(name = "Account_idAccount", nullable = false)
    private int accountidAccount;

    public BanktxPK() {
    }

    public BanktxPK(int idBankTx, int accountUseridUser, int txTypeidTxType, int accountidAccount) {
        this.idBankTx = idBankTx;
        this.accountUseridUser = accountUseridUser;
        this.txTypeidTxType = txTypeidTxType;
        this.accountidAccount = accountidAccount;
    }

    public int getIdBankTx() {
        return idBankTx;
    }

    public void setIdBankTx(int idBankTx) {
        this.idBankTx = idBankTx;
    }

    public int getAccountUseridUser() {
        return accountUseridUser;
    }

    public void setAccountUseridUser(int accountUseridUser) {
        this.accountUseridUser = accountUseridUser;
    }

    public int getTxTypeidTxType() {
        return txTypeidTxType;
    }

    public void setTxTypeidTxType(int txTypeidTxType) {
        this.txTypeidTxType = txTypeidTxType;
    }

    public int getAccountidAccount() {
        return accountidAccount;
    }

    public void setAccountidAccount(int accountidAccount) {
        this.accountidAccount = accountidAccount;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idBankTx;
        hash += (int) accountUseridUser;
        hash += (int) txTypeidTxType;
        hash += (int) accountidAccount;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BanktxPK)) {
            return false;
        }
        BanktxPK other = (BanktxPK) object;
        if (this.idBankTx != other.idBankTx) {
            return false;
        }
        if (this.accountUseridUser != other.accountUseridUser) {
            return false;
        }
        if (this.txTypeidTxType != other.txTypeidTxType) {
            return false;
        }
        if (this.accountidAccount != other.accountidAccount) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.BanktxPK[idBankTx=" + idBankTx + ", accountUseridUser=" + accountUseridUser + ", txTypeidTxType=" + txTypeidTxType + ", accountidAccount=" + accountidAccount + "]";
    }

}
